class Purchase < ActiveRecord::Base
  attr_accessible :user_id, :purchase_items_attributes
  
  has_many :purchase_items
  accepts_nested_attributes_for :purchase_items, :reject_if => :all_blank, :allow_destroy => true
  
  belongs_to :user
  
  
  
end
